package com.wen.system.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.wen.common.pojo.system.Permission;
import com.wen.common.utils.ResponseResult;

import java.util.List;

public interface PermissionService {

    // 查询所有权限
    List<Permission> getAllPermission();

    // 权限分页查询
    Page<Permission> findPermissionPage(int pageNum, int pageSize, String search);

    // 构造菜单树
    List<Permission> getMenuTree(List<Permission> list, int rootId);

    // 新增菜单
    int add(Permission permission);
    int delete(Long id);
    int update(Permission permission);

    Permission getMenuById(Long menuId);

    ResponseResult<?> selectMenuList(Permission  permission);
}
